-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to increase quality of the codebase #1654
base: master
Are you sure you want to change the base?
Conversation
* Now the code makes it more clear that this is backward compatibility support for CB1.
* Add specs to docblock * Remove unused imports
* This will be deprecated in future php versions (8.2) and may be removed later on. Maybe CB1 legacy code will stay a bit longer, so this could break.
* adds return statement
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1654 +/- ##
============================================
- Coverage 50.41% 50.39% -0.02%
+ Complexity 2719 2718 -1
============================================
Files 99 99
Lines 11296 11298 +2
============================================
- Hits 5695 5694 -1
- Misses 5601 5604 +3 ☔ View full report in Codecov by Sentry. |
…uctor also adds phpdoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nur Kleinigkeiten und Klarifizierungen. Ich kann leider nicht bei jeder geänderten Codestelle das manuell testen, ich verlasse mich jetzt da mal auf unsere automatisierten Tests.
|
||
// This was missing in previous versions. According to the availability spec, we can return a list with no items | ||
// TODO this part and the enclosing if-clause can be removed in future version, if no problems arose ... | ||
return new WP_REST_Response( $data, 200 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funktioniert das auch? Also gibt der dann erfolgreich eine leere Liste zurück? Wenn ja kann das so bleiben.
@@ -9,6 +9,8 @@ | |||
*/ | |||
abstract class BaseShortcode { | |||
|
|||
final public function __construct() { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Der Konstruktor wird aber nicht nochmal von den erbenden Klassen benutzt, muss der dann trotzdem hier angegeben werden? Bzw welchen Sinn hat es dann ihn da anzugeben?
@@ -286,7 +286,7 @@ public static function init( bool $ignoreErrors = false ):array{ | |||
} | |||
try { | |||
$bookingRule->setAppliedParams( | |||
$ruleParams ?? [], | |||
$ruleParams, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Geht das dann immer noch mit Regeln die keine ruleParams definiert haben? Ich meine ich hab das eingeführt, weil es sonst einen fatal Error mit solchen Regeln gab.
@@ -51,8 +52,7 @@ public static function getView() { | |||
**/ | |||
public static function replace_map_link_target() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Die Funktion ist sowieso unbenutzt, nicht? Also lohnt es sich vielleicht gar nicht da was dran zu ändern.
@@ -114,6 +119,8 @@ public function form( $instance ) { | |||
</p> | |||
<?php | |||
|
|||
return ''; // Parent class returns string, not used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Für das UserWidget haben wir keinen automatisierten Test, geht das noch? Wenn ja passt das!
@hansmorb